#!/bin/bash

make clean
make distclean

PATH=/usr/local/mingw32/bin:${PATH}

ac_cv_func_malloc_0_nonnull=yes ./configure --build=x86_64-slackware-linux --host=i386-mingw32

make "AR=i386-mingw32-ar" \
	"LIBS = -L/usr/local/mingw32/lib -lfltk_images -lpng -lz -ljpeg -lfltk -lm -lcomdlg32 -lcomctl32 -lgdi32 -luser32 -lshell32 -lole32 -luuid -liberty" \
	"LDFLAGS = -mwindows"

cp gebc.exe gebc-win32.exe
i386-mingw32-strip gebc-win32.exe 

